<template>
	<scroll-view class="component-box" scroll-y>
		<view v-for="item in modelValue" class="item-box">
			<view>{{item.from}} {{caculateTimeago(item.time)}}</view>
			<view>{{item.body}}</view>
		</view>
	</scroll-view>
</template>

<script lang="ts" setup>
	import {caculateTimeago} from "@/util/date";
	defineProps({
		modelValue: {
			type: Array,
			required: true
		}
	});
	
	
</script>

<style lang="scss">
	.component-box {
		
		.item-box {
			padding: 20rpx;
		}
		
	}
</style>